#
#    Alliciga's Process Partner Project
# 
#  Copyright (C) 2006-2011 Alliciga <alliciga@users.sourceforge.net>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
 
 
CXX := g++
AR  := ar rc

CXXFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3

SRCS := src/main.cxx src/MonitorPolicy.cxx src/MonitorProcess.cxx \
		src/MonitorThread.cxx src/NotificationPolicy.cxx \
		src/UserInterfaceThread.cxx src/SimpleThread.cxx \
		src/MemoryMonitorPolicy.cxx

OBJS := $(addsuffix .o, $(basename ${SRCS}))

default: ${OBJS} TinyXml
	${CXX} ${CXXFLAGS} src/main.o src/MonitorPolicy.o src/MonitorProcess.o \
src/MonitorThread.o src/NotificationPolicy.o src/UserInterfaceThread.o \
src/SimpleThread.o  src/MemoryMonitorPolicy.o\
-o appp -lboost_thread -lboost_program_options -LTinyXml -ltinyxml

%.o : %.cxx
	${CXX} -c ${CXXFLAGS} $< -o $@

clean:
	rm -f src/*.o
	rm -f appp
	rm -f TinyXml/*.o
	rm -f TinyXml/*.a
